package com.xhh.stu.entity;

import java.io.Serializable;

/**
 * 商品
 * <p>
 * 2017年1月4日 下午4:36:56
 * </p>
 * 
 * @author lijian
 * @version 1.0
 */
public class Goods implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String name;
	private double price;
	private double qty;
	private double totalPrice;
	private String act;// 参与活动
	private String unit;
	private double downMoney;// 节约
	private String barCode;//条形码

	public Goods(String name, double price, double qty, double totalPrice,
			String act, String unit, double downMoney, String barCode) {
		super();
		this.name = name;
		this.price = price;
		this.qty = qty;
		this.totalPrice = totalPrice;
		this.act = act;
		this.unit = unit;
		this.downMoney = downMoney;
		this.barCode = barCode;
	}

	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	public Goods(String name, double price, double qty, double totalPrice,
			String act, String unit, double downMoney) {
		super();
		this.name = name;
		this.price = price;
		this.qty = qty;
		this.totalPrice = totalPrice;
		this.act = act;
		this.unit = unit;
		this.downMoney = downMoney;
	}

	public double getDownMoney() {
		return downMoney;
	}

	public void setDownMoney(double downMoney) {
		this.downMoney = downMoney;
	}

	public Goods(String name, double price, double qty, double totalPrice,
			String act, String unit) {
		super();
		this.name = name;
		this.price = price;
		this.qty = qty;
		this.totalPrice = totalPrice;
		this.act = act;
		this.unit = unit;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}


	public String getAct() {
		return act;
	}

	public void setAct(String act) {
		this.act = act;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public double getQty() {
		return qty;
	}

	public void setQty(double qty) {
		this.qty = qty;
	}

	public double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	public String toString() {
		return "名称:" + name + ", 单价:" + price + "(元), 数量:" + qty + unit
				+ ", 小计:" + totalPrice + "(元), 优惠码=" + act + ",优惠金额:"+downMoney;
	}

}
